<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="AAuto" /> 
<title>执行网页脚本</title>
<link href="../style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="maincontent">
<h1>执行网页脚本</h1>
 <div class="desc">参考:<a href="../libraries/std/web/html.html"></a> <a href="webform.html">创建web窗体</a> <a href="external.html">在网页脚本中调用AAuto函数</a></div>
 <div>
    <h2>wb.doScript<a name="doScript" id="doScript"></a></h2>
  <p>&nbsp;</p>
  <p><strong>1、函数原型：</strong><br />
  </p>
  <pre>wb.doScript( 要执行的脚本代码,框架名字=&quot;&quot;,脚本语言名称=&quot;javascript&quot; )</pre>
  <p><strong>2、函数说明：</strong><br />
    <br /> 
    执行网页脚本,第二个参数、第三个参数都是可选参数。</p>
  <p><strong>3、调用示例：</strong><br />
  </p>
  <pre>
<span class="comment">//....省略创建web窗体的代码,请在快手中点击&quot;主菜单-&gt;新建文件-&gt;新建web窗体&quot;</span>

wb.write(&quot;&lt;a href='#' onclick='func()'&gt;执行wb.doScript创建的函数&lt;/a&gt;&quot;)

js = <span class="comment">/*

	function func(){
		alert('我是js,我的语法与AAuto很相似,都是C系语法哦')
	}
	func();

*/</span>

wb.doScript( js )</pre>
</div>

<div></div>
</div>
</body>
</html>